package org.cunamas.web.controller;

import java.util.List;

import org.cunamas.core.dao.TAAComidaDao;
import org.cunamas.core.dto.Comida;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component("demoPage")
@Scope("session")
public class DemoPage {
	
	
	@Autowired
	private TAAComidaDao comidaDao;
	
	private List<Comida> comidaList;
	
	private int codcom;
	
	private String onload = "";

	
	
	public void recargaLista(){
		System.out.println("controller"+codcom);
		comidaList = comidaDao.retonaListaComida(codcom);
	}
	
	public List<Comida> getComidaList() {
		System.out.println("ENTRO");
		return comidaList;
	}

	public void setComidaList(List<Comida> comidaList) {
		this.comidaList = comidaList;
	}

	public String getOnload() {
		//comidaList=comidaDao.retonaListaComida(10);
		return onload;
	}

	public void setOnload(String onload) {
		this.onload = onload;
	}

	public int getCodcom() {
		return codcom;
	}

	public void setCodcom(int codcom) {
		this.codcom = codcom;
	}

}